{% extends "admin/base.html" %}

{% block content_title %}{{apps_dict[model_grup]}}主页{% endblock %}

{% block content %}
  {% if panels %}
    <div class="row-fluid">
    {% for panel in panels %}
      {{ panel.render().decode('utf8')|safe() }}
    {% endfor %}
    </div>
  {% endif %}

  <table class="table table-bordered table-striped">
    <thead>
      <tr>
        <th class="shrink model-name">Model name</th>
        <th class="records">Records</th>
        <th class="shrink controls"></th>
      </tr>
    </thead>
    <tbody>
      {% for iter_admin in model_admins %}
        <tr class="link">
          <td><span class="show"><a href="{{ url_for(iter_admin.get_url_name('index')) }}">{{ iter_admin.get_display_name()|fix_underscores }}</a></span></td>
          <td><span>{{ iter_admin.get_query().count() }}</span></td>
          <td class="links">
            <ul class="inline">
              <li><a href="{{ url_for(iter_admin.get_url_name('add')) }}">新增</a></li>
              <li><a href="{{ url_for(iter_admin.get_url_name('export')) }}">导出</a></li>
            </ul>
          </td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}
